/**
 * 
 */
package com.google.code.cisx.gwt.client.layouts;

import com.google.gwt.user.client.ui.Widget;

/**
 * Template which defines only a single place holder for content.
 * 
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @version $Id: SingleContentLayoutTemplate.java 260 2008-11-30 09:06:35Z rahul.thakur.xdev $
 * @since 1.0
 */
public class SingleContentLayoutTemplate extends LayoutTemplate {

  /**
   * Content to be laid out.
   */
  private Widget content;

  /**
   * 
   */
  public SingleContentLayoutTemplate() {
    super();
  }

  // @Override
  public Widget getComponent(String placeholderId) {
    return this.content;
  }

  // @Override
  public LayoutTemplate setComponent(String placeholderId, Widget component) {
    this.content = component;
    return this;
  }

  // @Override
  public void render() {
    initWidget(content);
    content.setHeight("100%");
    content.setWidth("100%");
  }

}
